﻿using System;
using System.Collections.Generic;
using IcicleFramework.Components.Collision;

namespace IcicleFramework.Collision
{
    public class CollisionDictionary : Dictionary<Guid, ICollisionComponent>
    {
        public ICollisionComponent Source { get; set; }

        public bool Destroyed { get; set; }

        public new void Add(Guid key, ICollisionComponent value)
        {
            if (value.Parent.GUID.Equals(Source.Parent.GUID))
                return;

            base.Add(key, value);
        }
    }
}
